//
//  CustomCollectionViewCell.m
//  PigMarket
//
//  Created by 张敬 on 2019/8/1.
//  Copyright © 2019年 pigmarket.oc. All rights reserved.
//

#import "CustomCollectionViewCell.h"

@implementation CustomCollectionViewCell


- (UILabel *)label{
    
    if (!_label) {
        _label = [UILabel makeLabelWithText:@"" textColor:mMainTextColor font:mFont(12) textAliment:1];
        _label.backgroundColor = mBackgroudColor;
        _label.layer.borderWidth = 1;
        _label.layer.borderColor = mBackgroudColor.CGColor;
        
        _label.size = self.bounds.size;
        _label.mj_y = 5;
        _label.height = self.height - 10;
        
        [self addShadowAndCircleCorner:_label.layer corner:5];
        [self addSubview:self.label];
    }
    return _label;
}

- (void)setIsChoosed:(BOOL)isChoosed{
    
    if (isChoosed) {
        _label.backgroundColor = KWhiteColor;
        _label.layer.borderColor = mMainColor.CGColor;
        _label.textColor = mMainColor;
    }else{
        _label.backgroundColor = mBackgroudColor;
        _label.layer.borderColor = mBackgroudColor.CGColor;
        _label.textColor = mMainTextColor;
    }
}

@end
